#ifndef _LV_PM_H_
#define _LV_PM_H_

#define LV_PM_PART_TOUCH   (1 << 2)
#define LV_PM_PART_DISPLAY (1 << 1)
#define LV_PM_PART_MISC    (1 << 0)

typedef void (*lv_pm_cb_t)(void *);

typedef struct {
    lv_pm_cb_t suspend;
    lv_pm_cb_t resume;
    void *data;
    int part;
} lv_pm_info_t;

enum {
    PM_SUSPEND,
    PM_ON,
    PM_MAX,
};

int lv_pm_register(lv_pm_info_t *cb);
uint32_t lv_pm_set_state(int state);
int lv_pm_get_state(void);
uint32_t lv_pm_part_suspend(int part);
uint32_t lv_pm_part_resume(int part);
void lv_pm_init(void);

#endif
